﻿<common:LayoutAwarePage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:StudyTime_1"
    xmlns:common="using:StudyTime_1.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:UI="using:Microsoft.Advertising.WinRT.UI"
    x:Name="pageRoot"
    x:Class="StudyTime_1.Review1"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Mode=Self}}"
    mc:Ignorable="d" Loaded="pageRoot_Loaded">

    <common:LayoutAwarePage.Resources>

        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">My Application</x:String>
    </common:LayoutAwarePage.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Style="{StaticResource LayoutRootStyle}" Background="#FF8352C3">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Grid.Column="1" Text="Review Time" Style="{StaticResource PageHeaderTextStyle}"/>
        </Grid>

        <Grid Margin="10,5,0,0" x:Name="buttonGrid" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Button x:Name="check" Content="" HorizontalAlignment="Left" Height="75" Margin="929.5,468,0,0" VerticalAlignment="Top" Width="252" Background="#00FF0404" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto"  >
                <Button.RenderTransform>
                    <CompositeTransform SkewX="20"/>
                </Button.RenderTransform>
            </Button>
            <Button x:Name="next" Content="Next" HorizontalAlignment="Left" Margin="945.2,535,0,0" VerticalAlignment="Top" Width="252"  Height="71" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Click="next_Click" >
                <Button.RenderTransform>
                    <CompositeTransform SkewX="-20" TranslateX="-15" TranslateY="7" />
                </Button.RenderTransform>
            </Button>
            <Button x:Name="last"  Content="Previous" HorizontalAlignment="Left" Margin="99.2,535,0,0" VerticalAlignment="Top" Width="252" Height="75" Click="last_Click" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto"  >
                <Button.RenderTransform>
                    <CompositeTransform SkewX="20" TranslateX="-15" TranslateY="7" />
                </Button.RenderTransform>
            </Button>
            <Button x:Name="reviewBut"  Content="" HorizontalAlignment="Left" Height="75" Margin="86.7,468,0,0" VerticalAlignment="Top" Width="252" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto"   >
                <Button.RenderTransform>
                    <CompositeTransform SkewX="-20"/>
                </Button.RenderTransform>
            </Button>
            <Border BorderBrush="White" BorderThickness="1" Height="439"  HorizontalAlignment="Left" Margin="204,10,0,0" x:Name="border1" VerticalAlignment="Top" Width="846" CornerRadius="5" RenderTransformOrigin="0.5,0.5" />
               
            <ScrollViewer HorizontalAlignment="Center" Height="412" Margin="215,18,226,0" VerticalAlignment="Top" Width="824">
                <TextBlock Name="questions" Height="613" TextWrapping="Wrap" TextAlignment="Left" Width="812" FontFamily="Segoe WP" FontSize="26"/>
            </ScrollViewer>
            

            <TextBlock x:Name="errorBox" HorizontalAlignment="Left" Height="85" Margin="934,-135,0,0" TextWrapping="Wrap"  VerticalAlignment="Top" Width="331" FontFamily="Segoe UI" FontSize="14" Foreground="Red" TextAlignment="Center"/>


            <Grid x:Name="popin">
                <Grid.Resources>
                    <Storyboard x:Name="popinSB">
                        <PopInThemeAnimation Storyboard.TargetName="popin" FromHorizontalOffset="500"/>
                    </Storyboard>
                    <Storyboard x:Name="popoutSB">
                        <PopOutThemeAnimation  Storyboard.TargetName="popin" />
                    </Storyboard>
                </Grid.Resources>
                <ScrollViewer Name="imgScroll" Visibility="Collapsed" HorizontalAlignment="Center" Margin="219,9,228,171">
                    <Image Name="quizImage" HorizontalAlignment="Center" Height="411" VerticalAlignment="Center" Width="807" Stretch="Uniform"/>
                </ScrollViewer>
            </Grid>



            <Button Content="Image" x:Name="imagebttn" IsEnabled="False" HorizontalAlignment="Center" Height="50" Margin="505,520,500,0" VerticalAlignment="Top" Width="260" Click="imagebttn_Click" />


        </Grid>

    </Grid>
</common:LayoutAwarePage>
